package com.itheima3.dao.impl;


import com.itheima3.dao.UserDao;
import com.itheima3.domain.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @author lenovo
 */
@Repository
public class UserDaoImpl implements UserDao {
    @Autowired
    private JdbcTemplate template;
    public void regist(User user) {
        String sql="insert into regist value(?,?)";
        int update = template.update(sql, user.getUsername(), user.getPassword());
        System.out.println(update);
    }
}
